package com.qf.fmw.service.impl;

import com.qf.fmw.dao.MessageDao;
import com.qf.fmw.dao.impl.MessageDaoImpl;
import com.qf.fmw.entity.bo.MessageBo;
import com.qf.fmw.entity.vo.RespResult;
import com.qf.fmw.service.MessageService;

public class MessageServiceImpl implements MessageService {
    private MessageDao messageDao = new MessageDaoImpl();

    public RespResult showMessage(int userId) {
        MessageBo message = (MessageBo) messageDao.getUserById(userId);
        if (message != null) {
            return RespResult.respSuccess("成功", message);
        } else {
            return RespResult.respError("未找到用户", null);
        }
    }
}


